<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
	    <link href="../../css/style.css" rel="stylesheet"/>
	    <link rel="stylesheet" href="../../css/news_list/tea_company.css" />
	    <script src="../../js/statistics.js"></script>
	</head>
		
	<body>
		<header class="mui-bar mui-bar-nav header">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title" id='title'>
		    	 
		    </h1>
		</header>
		<div class="body">
			<!--<h2>+data.data.name</h2>
			<p style="overflow:auto;">
				<span class="left">data.data.create_time</span>
			</p>
			<div class="news">
				<p><span style="line-height: 18.5714px;">利物浦是冠军！！！</span><br></p>
				<p><img src="http://lskj.tpddns.cn/uploads/picture/20170527/ae234949fe6ecb1151e55dc72d66d43e.png" data-filename="image name" style="width: 959px;"></p>
				<p><br></p>
			</div>;-->
		</div>
		<script src="../../plugins/jquery/jquery-3.1.0.min.js" type="text/javascript" ></script>
		<script src="../../plugins/template/template.js"></script>
		<script src="../../plugins/mui/mui.min.js"></script>
		<script src="../../js/getApiToken.js"></script>
		<script src="../../js/md5.js"></script>
		<script type="text/javascript">
			mui.init();
			
			mui.plusReady(function(){
				var id = plus.webview.currentWebview().detailId,
					title = plus.webview.currentWebview().detailTitle,
					type = plus.webview.currentWebview().detailType;
				var wait = plus.nativeUI.showWaiting('正在加载中...');
				if(type == 'venue'){
					myAjax('physical/Venues/getdetail','get',{'id':id},function(data){
						console.log(JSON.stringify(data))
						if(data.code == 0){
							var venue =  '<h2>'+data.data.name+'</h2>'+
									'<p style="overflow:auto;">'+
										'<span class="left">'+data.data.create_time+'</span>'+
									'</p>'+
									'<div class="news">'+data.data.detail+'</div>';
							$('.body').append(venue);
							changeImg();
							wait.close();
							
						}
					})
				}else{
					myAjax('physical/Union/getdetail','get',{'id':id},function(data){
						console.log(JSON.stringify(data))
						if(data.code == 0){
							var gym =  '<h2>'+data.data.name+'</h2>'+
									'<p style="overflow:auto;">'+
										'<span class="left">'+data.data.create_time+'</span>'+
									'</p>'+
									'<div class="news">'+data.data.detail+'</div>';
							$('.body').append(gym);
							changeImg();
							wait.close();
						}
					})
				}
				$('header h1').text(title);
			});
			function changeImg(){
				$('.body').find('.news img').each(function (e) {
					$(this).css({
						'width': '100%',
						'height': 'auto'
					});
				});
			};
		</script>
	</body>
</html>